"""
@author: ZY
@Time: 2021/10/07
"""
import time
from BeautifulReport import BeautifulReport
import unittest

'''指定测试用例为当前文件夹下的interface_case_msg目录'''
test_dir = './case'
discover = unittest.defaultTestLoader.discover(test_dir, pattern='test*')

if __name__ == "__main__":
    now = time.strftime("%Y-%m-%d %H%M%S")
    filename = './report/' + now + '-result.html'
    fp = open(filename, 'wb')
    BeautifulReport(discover).report(description='如诗般接口测试', filename=filename, report_dir='')
    fp.close()
